<#import "/spring.ftl" as s/>
<@override name="project">
         ${project.name}
</@override>
<@override name="main">
<ol class="wizard-nav">
    <li class="done"><a href="#"><span class="badge">1</span><small>发布信息</small></a></li>
    <li class="done"><a href="#"><span class="badge">2</span><small>触发构建</small></a></li>
    <li class="active"><a href="#"><span class="badge badge-info">3</span><small>缺陷报告</small></a></li>
    <li><a href="#"><span class="badge badge-warning">4</span><small>开发范围&特性描述</small></a></li>
    <li><a href="#" data-disabled><span class="badge badge-important">5</span><small>邮件通知&确认发布</small></a></li>
</ol><br/><br/><br/>

<fieldset >
    <legend>XXX</legend>
    <div id="step3_form_">
        <form id="step3_form" action="<@s.url '/project/milestone/wizard/wizard_form/'/>${milestone.id}" method="post">
            <table art="form" autoLabel="true"  rightAlign="true" columns="1,9" colon="true">
                <tr>
                    <td></td>
                    <td><input type="hidden" id="_page" name="_page" value="2"></td>
                </tr>

                <tr>
                    <td>
                        <label art="label" for="projectName">项目名称</label>
                    </td>
                    <td>
                        <input type="text"art="textbox" id="projectName" name="projectName" readonly="true" value="${project.name}">
                    </td>
                </tr>

                <tr>
                    <td>
                        <label art="label" for="buildNote">构建号</label>
                    </td>
                    <td>
                        <input type="text" art="textbox" id="buildNote" name="buildNote" readonly="true" value="${milestoneReport.buildNote}" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <textarea id="issueList" name="issueList"   maxlength="250" width="600px" height="70px" style="resize: none;display: none;" emptyText="已知问题列表"
                                >${milestoneReport.issueList}</textarea>
                    <td>
                        <input art="button" id="issue_import" name="issue_import"  onclick="importIssue()" text="导入反馈"/>
                    </td>
                </tr>

                <tr>
                    <td>
                    </td>
                    <td>
                        <button type="submit" value="previous" name="_target1"> <span><span>上一步</span></span></button>
                        <button type="submit" value="next" name="_target3"> <span><span>下一步</span></span></button>
                        <button type="submit" name="_cancel" value="_cancel"><span><span>取消</span></span></button>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</fieldset>
<div id="issue_upload_file" style="display: none">
    <form id="issue_import_form" action="<@s.url '/project/milestone/issue_import'/>" method="post" enctype="multipart/form-data" >
        <input id="store_p_id" type="hidden" name="pid" value="1"/>
        <table art="form" columns="120,*" autoLabel="true" rightAlign="true" colon="true">
            <tr>
                <td colspan="2" style="background:#fffcef;" title="<@s.message 'account.list.import.file.tip'/>">
                    导入反馈
                </td>
            </tr>
            <tr>
                <td>
                    <label art='label' for="issue_attachment" required='true'><@s.message "account.list.import.file"/></label>
                </td>
                <td>
                    <input id="issue_attachment" name="attachment" type="file" required='true'>
                </td>
            </tr>
            <tr>
                <td></td>
                <td align="center">
                    <button id="issue_upload_file_button" type="submit" >
                        <span><span><@s.message 'operation.project.team.import'/></span></span>
                    </button>
                    <span style="width:10px;"></span>
                    <button id="issue_upload_file_cancel" type="button">
                        <span><span><@s.message 'operation.cancel'/></span></span>
                    </button>
                </td>
            </tr>
        </table>
    </form>
</div>

</@override>
<@override name="scripts">
<script type="text/javascript">
    var  code ='${project.code}';
    function importIssue(){
        $('#issue_upload_file').layer({title: language.account.import_exl_data, target: "top"}).open();
        cdms.common.form_submit('issue_import_form', {}, function (data) {
//             var json_data=eval('('+data+')');
            if (data.type) {
                if(data.msg==""){
                    $.alert("文件内容为空或文件格式有误!", language.note.alert_title);
                }else{
                    $('#issueList').attr('value',data.msg);
                }
                $('#issue_upload_file').layer().close();
//                  $.alert(data.msg, language.note.alert_title);
//                  cdms.common.show_ajax_msg(data.msg);
//                  $('#issue_upload_file').layer().close();
////                  project_list.reload();

            } else {
                $.alert(data.msg, language.note.alert_title);
            }
        });
        $('#issue_upload_file_cancel').click(function () {
            $('#issue_upload_file').layer().close();
        })
    }
</script>

</@override>


<@extends name="/common/projectlayout1.1.ftl" current="milestone" title='${title}' code='${project.code}'></@extends>